/**************************************************************************(C)*
 *
 *  This file is part of the GreenHills project
 *  Copyright (C) 2009  Tieto Corporation
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  Not for commmercial use. Only with Tieto permission.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *************************************************************************(C)*/

#pragma once

#include "staticroomitem.h"
#include "gps/gpsposition.h"
#include "coredll.h"

namespace greenhills {

namespace util {
    class obinstream;
    class ibinstream;
}

namespace core {

/** @brief Moovable room item object
 *
 * This class represents object in a room which has an ability to move, so it
 * has some specific movement speed and movement direction.
 */
class GH_CORE_CLASS CMoveableRoomItem : public CStaticRoomItem
{
public:
    CMoveableRoomItem();
    CMoveableRoomItem(const core::CItemId &pId, const std::string &nName);

public:
    virtual util::obinstream& operator<<(util::obinstream &pStream) const;
    virtual util::ibinstream& operator>>(util::ibinstream &pStream);

public:
    float movementSpeed() const {return mMovementSpeed;}
    float movementDirection() const {return mMovementDirection;}

public:
    void setMovementSpeed(float pMovementSpeed)
        {mMovementSpeed = pMovementSpeed;}
    void setMovementDirection(float pMovementDirection)
        {mMovementDirection = pMovementDirection;}

protected:
    float mMovementSpeed;
    float mMovementDirection;
};

} //namespace core
} //namespace greenhills
